﻿using System.ComponentModel;
using System.Configuration.Install;
using System.Diagnostics;

namespace Navigant.Infrastructure.Helpers
{
    [RunInstaller(true)]
    public partial class LoggerInstaller : Installer
    {
        private EventLogInstaller eventLogInstaller;

        public LoggerInstaller()
        {
            this.InitializeComponent();

            // Create Instance of EventLogInstaller
            this.eventLogInstaller = new EventLogInstaller();

            // Set the Source of Event Log to be created
            this.eventLogInstaller.Source = Logger.SourceName;

            // Set the Log that source is created in
            this.eventLogInstaller.Log = "Application";

            // Add eventLogInstaller to the Installers collection
            Installers.Add(this.eventLogInstaller);
        }
    }
}
